<html>
<script src="/js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="/js/ckeditor/ckeditor.js" type="text/javascript"></script>
<link href="/js/ckeditor/contents.css" type="text/css" rel="stylesheet">
<script src="/js/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<link href="/js/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet">
<script src="/js/bootstrap-treeview/dist/bootstrap-treeview.min.js" type="text/javascript"></script>
<link href="/js/bootstrap-treeview/dist/bootstrap-treeview.min.css" type="text/css" rel="stylesheet">
<script src="/js/bootStrap-addTabs/bootstrap.addtabs.min.js" type="text/javascript"></script>
<link href="/js/bootStrap-addTabs/bootstrap.addtabs.css" type="text/css" rel="stylesheet">
<script src="/js/toastr/toastr.min.js" type="text/javascript"></script>
<link href="/js/toastr/toastr.css" type="text/css" rel="stylesheet">
<script src="/js/bootstrap-table/dist/bootstrap-table.min.js" type="text/javascript"></script>
<link href="/js/bootstrap-table/dist/bootstrap-table.min.css" type="text/css" rel="stylesheet">
<script src="/js/bootstrap-table/dist/locale/bootstrap-table-zh-CN.min.js" type="text/javascript"></script>
<script src="/js/bootstrap-fileinput/js/fileinput.min.js" type="text/javascript"></script>
<link href="/js/bootstrap-fileinput/css/fileinput.min.css" type="text/css" rel="stylesheet">
<script src="/js/bootstrap-fileinput/js/locales/zh.js" type="text/javascript"></script>
<script src="/js/bootstrap-dialog/dist/js/bootstrap-dialog.min.js" type="text/javascript"></script>
<link href="/js/bootstrap-dialog/dist/css/bootstrap-dialog.min.css" type="text/css" rel="stylesheet">
<script src="/js/zTreev3/js/jquery.ztree.all.js" type="text/javascript"></script>
<link href="/js/zTreev3/css/zTreeStyle/zTreeStyle.css" type="text/css" rel="stylesheet">
<style>
    .container-fluid {
        margin-top: 20px;
    }
</style>
<head>
    <title>后台管理系统</title>
    <style>
        .iframeClass {
            height: 600px !important;
        }
    </style>
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div id="tree" class="col-md-3"></div>
        <div class="col-md-9">
            <ul class="nav nav-tabs" id="myTab">
                <li class="active">
                </li>
            </ul>
            <div class="tab-content">
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function getTree() {
        var tree;
        $.ajax({
            url: "/Resources/show",
            type: "post",
            dataType: "json",
            async: false,
            success: function (pm) {
                tree = pm;
            }
        })
        return tree;
    }

    $('#tree').treeview(
        {
            data: getTree(),
            // borderColor: "blue",
            onNodeSelected: function (event, data) {
                if (data.url == 0) {
                    location.href = "/AdminUser/exitlogin"
                }
                if (data.url != null) {
                    $.addtabs.add({
                        id: data.id,
                        title: data.text,
                        url: data.url
                    })
                }
            }
        }
    );
</script>
</body>
</html>
